<template>

	<view>
		<bg-video></bg-video>
		<cu-custom bgColor="bg-main" :isBack="true">
			<block class="text-white" slot="content">会员详细</block>
		</cu-custom>

		<view class=" flex flex-direction justify-between bg-white">
			<view class="padding flex ">
				<view class="cu-avatar cover round lg" :style="'background-image:url('+client.headimg+')'"></view>
				<view class="flex flex-direction justify-around info">
					<view class="text-lg margin-left">{{client.nc}}</view>
					<view class="flex align-center margin-left">
						<view class="text-sm ">
							<text class='cu-tag round bg-green' v-if="ahyjl.tkflg == 'U'">未退款</text>
							<text class='cu-tag round bg-blue' v-if="ahyjl.tkflg == 'R'">已申退</text>
							<text class='cu-tag round bg-gray' v-if="ahyjl.tkflg == 'J'">已退还</text>
						</view>
						<view class="text-sm ">
							<text class='cu-tag round bg-green' v-if="ahyjl.stu == 'U'">未开始</text>
							<text class='cu-tag round bg-blue' v-if="ahyjl.stu == 'R'">已生效</text>
							<text class='cu-tag round bg-gray' v-if="ahyjl.stu == 'F'">已结束</text>
						</view>
					</view>
				</view>
			</view>
		</view>

		<view class="bg-white">
			<!-- 会员详细 -->
			<view class="cu-bar bg-white solid-bottom">
				<view class="action">
					<text class="cuIcon-titles text-orange "></text>会员详细
				</view>
			</view>

			<view class="padding">
				<view class="cu-form-group">
					<view class="title">会员类型</view>
					<view>{{ahylx.hlname}}</view>
				</view>
				<view class="cu-form-group">
					<view class="title">金额</view>
					<view>{{ahyjl.amount}}</view>
				</view>
				<view class="cu-form-group">
					<view class="title">周期</view>
					<view>{{ahyjl.zq}}</view>
				</view>
				<view class="cu-form-group">
					<view class="title">次数</view>
					<view>{{ahylx.cs}}</view>
				</view>
				<view class="cu-form-group">
					<view class="title">购买日期</view>
					<view>{{ahyjl.cd}}</view>
				</view>
				<view class="cu-form-group">
					<view class="title">生效日期</view>
					<view>{{ahyjl.sd}}</view>
				</view>
				<view class="cu-form-group">
					<view class="title">结束日期</view>
					<view>{{ahyjl.ed}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {

		data: function() {
			return {
				ahyjl: {},
				ahylx: {},
				client: {}
			}
		},

		onLoad: function(option) {
			this.ahyjl.hyjlid = option.hyid;
			this.loadHy();
		},

		methods: {
			loadHy: function() {
				this.api("/client/hyjl/info/get").send({
					hyjlid: this.ahyjl.hyjlid
				}).then(res => {
					this.ahyjl = res.ahyjl;
					this.ahylx = res.ahylx;
					this.client = res.client
				})
			}

		}
	}
</script>

<style>
</style>